<template>
  <div>
      <div class="imgs"  :style="{backgroundImage:`url('${pics[0]}')`}"> 
          <div class="login">
              <div class="">
                  <h2>注册成功</h2>
              </div>
              <div>
                  <p>页面自动 <a href="#/index">跳转</a> ，等待时间{{msg}}</p>
              </div>
          </div>
      </div>

  </div>
</template>

<script>
import {goods,login} from '../assets/request'
export default {
    data(){
        return{
            pics:[],
            msg:5

        }
    },
    methods:{

    },
    async created(){
        let res = await goods({
            project_id:101
        })
        this.pics.push(res.rows[0].s_goods_photos[0].path)
        
        let timer = setInterval(() => {
            this.msg--
        if(this.msg == 0){
            clearInterval(timer)
        }
        }, 1000);

        
    },

}
</script>

<style lang='scss' scoped>
    .imgs{
        width: 100%;
        height: 60vh;
        overflow: hidden;
        background-size: 100% auto;
        background-repeat: no-repeat;
        .login{
            background-color: #fff;
            width: 500px;
            margin: 100px 100px 50px auto;
            float: right;
            position: relative;
            padding: 0 20px 30px;
            min-height: 500px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            h2{
                font-size: 30px;
                color: black;
            }
            p{
                line-height: 100px;
                font-size: 16px;
                a{
                    text-decoration: underline
                }
            }
        }
    }


    
</style>